package edu.nf.ch03.config;

import org.springframework.ai.transformer.splitter.TextSplitter;
import org.springframework.ai.transformer.splitter.TokenTextSplitter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author wangl
 * @date 2024/12/2
 */
@Configuration
public class AiConfigure {

    /**
     * 文本分割器
     * @return
     */
    @Bean
    public TextSplitter tokenSplitter() {
        return new TokenTextSplitter();
    }
}